package com.olt.dao.oltCenter;

import com.olt.domain.oltTest.ExamProblem;
import org.aspectj.weaver.ast.Test;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.UUID;

public interface IExamProblem extends JpaRepository<ExamProblem,Long> {
    void deleteByPaperId(Long id);

    List<ExamProblem> findAllByPaperId(Long id);

    @Query(value = "select ex from ExamProblem ex left join OltTest test  on ex.paperId=test.paperId where test.testId=?1 order by ex.no asc ")
    List<ExamProblem> findByTestId(String id);






}
